{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "77d9fa9f",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/realtime/realtime.py:18: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(warn_message)\n",
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/plot/plot.py:16: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(\"Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\")\n",
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/tracks/plot.py:25: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(\"Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\")\n",
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/tornado/dataset.py:21: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(warn_message)\n",
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/tornado/plot.py:21: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(\"Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\")\n",
      "/home/jreniel/.local/lib/python3.9/site-packages/tropycal/recon/plot.py:22: UserWarning: Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\n",
      "  warnings.warn(\"Warning: Cartopy is not installed in your python environment. Plotting functions will not work.\")\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--> Starting to read in current storm data\n",
      "--> Completed reading in current storm data (5.19 seconds)\n"
     ]
    }
   ],
   "source": [
    "from tropycal.realtime import Realtime\n",
    "rt = Realtime()\n",
    "active_storms = rt.list_active_storms()\n",
    "storm = rt.get_storm(active_storms[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "bc11a99e",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = storm.to_dataframe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "13b7a13f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>extra_obs</th>\n",
       "      <th>special</th>\n",
       "      <th>type</th>\n",
       "      <th>lat</th>\n",
       "      <th>lon</th>\n",
       "      <th>vmax</th>\n",
       "      <th>mslp</th>\n",
       "      <th>wmo_basin</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-05-19 00:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>DB</td>\n",
       "      <td>30.2</td>\n",
       "      <td>-58.3</td>\n",
       "      <td>20</td>\n",
       "      <td>1018</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-05-19 06:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>DB</td>\n",
       "      <td>30.0</td>\n",
       "      <td>-57.6</td>\n",
       "      <td>20</td>\n",
       "      <td>1017</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-05-19 12:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>DB</td>\n",
       "      <td>30.0</td>\n",
       "      <td>-56.9</td>\n",
       "      <td>25</td>\n",
       "      <td>1016</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-05-19 18:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>DB</td>\n",
       "      <td>30.0</td>\n",
       "      <td>-56.2</td>\n",
       "      <td>25</td>\n",
       "      <td>1015</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-05-20 00:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>30.3</td>\n",
       "      <td>-55.4</td>\n",
       "      <td>30</td>\n",
       "      <td>1013</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2021-05-20 06:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>31.7</td>\n",
       "      <td>-54.6</td>\n",
       "      <td>30</td>\n",
       "      <td>1013</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2021-05-20 12:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>32.9</td>\n",
       "      <td>-52.3</td>\n",
       "      <td>35</td>\n",
       "      <td>1012</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2021-05-20 18:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>34.4</td>\n",
       "      <td>-53.7</td>\n",
       "      <td>40</td>\n",
       "      <td>1011</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2021-05-21 00:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>34.9</td>\n",
       "      <td>-55.0</td>\n",
       "      <td>50</td>\n",
       "      <td>1008</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2021-05-21 06:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>35.5</td>\n",
       "      <td>-56.7</td>\n",
       "      <td>50</td>\n",
       "      <td>1008</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2021-05-21 12:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>35.7</td>\n",
       "      <td>-58.7</td>\n",
       "      <td>50</td>\n",
       "      <td>1008</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2021-05-21 18:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>35.0</td>\n",
       "      <td>-61.2</td>\n",
       "      <td>45</td>\n",
       "      <td>1005</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2021-05-22 00:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>EX</td>\n",
       "      <td>34.5</td>\n",
       "      <td>-61.8</td>\n",
       "      <td>45</td>\n",
       "      <td>1005</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2021-05-22 06:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>SS</td>\n",
       "      <td>34.2</td>\n",
       "      <td>-62.1</td>\n",
       "      <td>40</td>\n",
       "      <td>1006</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2021-05-22 12:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>SS</td>\n",
       "      <td>34.4</td>\n",
       "      <td>-62.8</td>\n",
       "      <td>40</td>\n",
       "      <td>1006</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2021-05-22 18:00:00</td>\n",
       "      <td>0</td>\n",
       "      <td></td>\n",
       "      <td>SS</td>\n",
       "      <td>34.2</td>\n",
       "      <td>-62.6</td>\n",
       "      <td>35</td>\n",
       "      <td>1007</td>\n",
       "      <td>north_atlantic</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  date  extra_obs special type   lat   lon  vmax  mslp  \\\n",
       "0  2021-05-19 00:00:00          0           DB  30.2 -58.3    20  1018   \n",
       "1  2021-05-19 06:00:00          0           DB  30.0 -57.6    20  1017   \n",
       "2  2021-05-19 12:00:00          0           DB  30.0 -56.9    25  1016   \n",
       "3  2021-05-19 18:00:00          0           DB  30.0 -56.2    25  1015   \n",
       "4  2021-05-20 00:00:00          0           EX  30.3 -55.4    30  1013   \n",
       "5  2021-05-20 06:00:00          0           EX  31.7 -54.6    30  1013   \n",
       "6  2021-05-20 12:00:00          0           EX  32.9 -52.3    35  1012   \n",
       "7  2021-05-20 18:00:00          0           EX  34.4 -53.7    40  1011   \n",
       "8  2021-05-21 00:00:00          0           EX  34.9 -55.0    50  1008   \n",
       "9  2021-05-21 06:00:00          0           EX  35.5 -56.7    50  1008   \n",
       "10 2021-05-21 12:00:00          0           EX  35.7 -58.7    50  1008   \n",
       "11 2021-05-21 18:00:00          0           EX  35.0 -61.2    45  1005   \n",
       "12 2021-05-22 00:00:00          0           EX  34.5 -61.8    45  1005   \n",
       "13 2021-05-22 06:00:00          0           SS  34.2 -62.1    40  1006   \n",
       "14 2021-05-22 12:00:00          0           SS  34.4 -62.8    40  1006   \n",
       "15 2021-05-22 18:00:00          0           SS  34.2 -62.6    35  1007   \n",
       "\n",
       "         wmo_basin  \n",
       "0   north_atlantic  \n",
       "1   north_atlantic  \n",
       "2   north_atlantic  \n",
       "3   north_atlantic  \n",
       "4   north_atlantic  \n",
       "5   north_atlantic  \n",
       "6   north_atlantic  \n",
       "7   north_atlantic  \n",
       "8   north_atlantic  \n",
       "9   north_atlantic  \n",
       "10  north_atlantic  \n",
       "11  north_atlantic  \n",
       "12  north_atlantic  \n",
       "13  north_atlantic  \n",
       "14  north_atlantic  \n",
       "15  north_atlantic  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "262de55c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
